package com.mpyy.service.everyday;

import com.mpyy.dao.everyday.SupplierDaointer;
import com.mpyy.pojo.PurchaseStock;
import com.mpyy.pojo.SupplierInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @Description SupplierServiceImpl
 * Author 供货商信息
 * @Date 2022-03-09 8:23
 */
@Service("supplierService")
public class SupplierServiceImpl implements SupplierServiceInter {
    @Autowired
    private SupplierDaointer supplierDaointer;

    /**
     * 根据名称查询供货商信息
     * @param supName
     * @return
     */
    @Override
    public List<SupplierInfo> supperlierall(String supName) {
        return supplierDaointer.supperlierall(supName);
    }

    /**
     * 根据id查询供货商信息
     * @param supId
     * @return
     */
    @Override
    public List<PurchaseStock> differs(String supId ){
        return supplierDaointer.alldiffer(supId);
    }

    /**
     * 根据供货商信息查询详细信息
     * @param purStoId
     * @return
     */
    @Override
    public List<PurchaseStock> alldetailed(String purStoId){
        return supplierDaointer.alldetailed(purStoId);
    }

    /**
     * 添加供货商用户
     * @param supplierInfo
     * @return
     */
    @Override
    public int supperlierinsert(SupplierInfo supplierInfo) {
        return supplierDaointer.supperlierinser(supplierInfo);
    }
    public int supperlierdel(String supId){
        return supplierDaointer.supperlierdel(supId);
    }
    public int supperlierupdata(SupplierInfo supplierInfo){
        return supplierDaointer.supperlierupdata(supplierInfo);
    }
    @Override
    public List<SupplierInfo> ghs() {
        return supplierDaointer.ghs();
    }

    public List<SupplierInfo> kh(){
        return supplierDaointer.kh();
    }
}
